package com.open.cloud.rbac.mapper.permission;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.cloud.rbac.entity.menu.CoreMenu;
import com.open.cloud.rbac.entity.permission.CorePermissionMenuRel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限菜单关联表 Mapper 接口
 * </p>
 *
 * @author wangzengzhou01
 * @since 2024-12-23
 */
@Mapper
public interface CorePermissionMenuRelMapper extends BaseMapper<CorePermissionMenuRel> {

    /**
     * 批量插入权限菜单
     *
     * @param list
     * @return
     */
    public Integer batchInsertPermissionMenuRel(@Param("list") List<CorePermissionMenuRel> list);

    /**
     * 根据权限Id删除权限菜单关联关系
     *
     * @param permissionId
     * @return
     */
    public Integer deletePermissionMenuRel(@Param("permissionId") String permissionId);


    /**
     * 根据权限Id获取菜单列表
     *
     * @param permissionId
     * @return
     */
    public List<CoreMenu> getPermissionMenuList(@Param("permissionId") String permissionId);

}
